﻿//是否类型的模拟复选框的渲染函数
function checkboxRender(rowdata, rowindex, value, column)
{
    var iconHtml = '<div class="chk-icon';
    if (value) iconHtml += " chk-icon-selected";
    iconHtml += '"';
    iconHtml += ' rowid = "' + rowdata['__id'] + '"';
    iconHtml += ' gridid = "' + this.id + '"';
    iconHtml += ' columnname = "' + column.name + '"';
    iconHtml += '></div>';
    return iconHtml;
}
//是否类型的模拟复选框的点击事件
$("div.chk-icon").live('click', function ()
{
    var grid = $.ligerui.get($(this).attr("gridid"));
    var rowdata = grid.getRow($(this).attr("rowid"));
    var columnname = $(this).attr("columnname");
    var checked = rowdata[columnname];

    grid.updateCell(columnname, !checked, rowdata);
});